From: Nick Roberts Date: Wed, 30 Dec 2009 02:22:45 +0000 (+1300) Subject: Show working revision correctly for mercurial. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~324^2~8829 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=6b10a82bd22299f34981af2e798e2e08212f4c65;p=emacs.git Show working revision correctly for mercurial. * vc-hg.el (vc-hg-working-revision): Use hg parent instead of hg log as suggested by Alex Harsanyi , --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 54ec8f20928..02b2a3e9ca6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-12-30 Nick Roberts + + Show working revision correctly for mercurial. + * vc-hg.el (vc-hg-working-revision): Use hg parent instead of + hg log as suggested by Alex Harsanyi , + 2009-12-29 Juanma Barranquero Declare some functions for the byte-compiler. diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 91e9d682f88..9dc1d380b0a 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -209,14 +209,11 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." ;; Ignore all errors. (process-file "hg" nil t nil - "log" "-l1" (file-relative-name file))) + "parent" "--template" "\"{rev}\"" (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) - (when (eq 0 status) - (if (string-match "changeset: *\\([0-9]*\\)" out) - (match-string 1 out) - "0")))) + (when (eq 0 status) (read out)))) ;;; History functions